#ifndef CLASSEDITMODEL_H
#define CLASSEDITMODEL_H


#include <D20CampaignModel.h>
#include <D20ClassModel.h>

#include <QStandardItemModel>
#include <QPointer>


class ClassEditModel : public QStandardItemModel
{
    Q_OBJECT

public:

    enum Field
    {
        Field_FIRST = 0,
        NameField = Field_FIRST,
        ValueField,
        Field_LAST = ValueField
    };

    ClassEditModel(QObject *parent = 0);

    void setClassModel(D20CharacterModel* model);
    void setCampaignModel(D20CampaignModel* model);

    virtual bool setData(const QModelIndex &index, const QVariant &value, int role);


protected slots:

    void refresh();
//    void setItemState();


protected:

    QPointer<D20CharacterModel> m_character;
    QPointer<D20CampaignModel> m_campaign;


};

#endif // CLASSEDITMODEL_H
